package com.yc.tc.beans;

public class YjInfo {
	private int yjid;
	private int usid;
	//private int jdid;
	private String yjbiaoti;
	private String yjcontent;
	private String photo;
	private String date;
	private String flag;
	private String temp;
	@Override
	public String toString() {
		return "YjInfo [yjid=" + yjid + ", usid=" + usid + ", yjbiaoti="
				+ yjbiaoti + ", yjcontent=" + yjcontent + ", photo=" + photo
				+ ", date=" + date + ", flag=" + flag + ", temp=" + temp + "]";
	}
	public YjInfo(int yjid, int usid, String yjbiaoti, String yjcontent,
			String photo, String date, String flag, String temp) {
		super();
		this.yjid = yjid;
		this.usid = usid;
		this.yjbiaoti = yjbiaoti;
		this.yjcontent = yjcontent;
		this.photo = photo;
		this.date = date;
		this.flag = flag;
		this.temp = temp;
	}
	public YjInfo() {
		super();
		// TODO Auto-generated constructor stub
	}
	public int getYjid() {
		return yjid;
	}
	public void setYjid(int yjid) {
		this.yjid = yjid;
	}
	public int getUsid() {
		return usid;
	}
	public void setUsid(int usid) {
		this.usid = usid;
	}
	public String getYjbiaoti() {
		return yjbiaoti;
	}
	public void setYjbiaoti(String yjbiaoti) {
		this.yjbiaoti = yjbiaoti;
	}
	public String getYjcontent() {
		return yjcontent;
	}
	public void setYjcontent(String yjcontent) {
		this.yjcontent = yjcontent;
	}
	public String getPhoto() {
		return photo;
	}
	public String getOnePhoto() {
		if(!"".equals(photo) && photo.indexOf(",")>0){
			return photo.substring(0, photo.indexOf(","));
		}else{
			return photo;
		}
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public String getFlag() {
		return flag;
	}
	public void setFlag(String flag) {
		this.flag = flag;
	}
	public String getTemp() {
		return temp;
	}
	public void setTemp(String temp) {
		this.temp = temp;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + ((flag == null) ? 0 : flag.hashCode());
		result = prime * result + ((photo == null) ? 0 : photo.hashCode());
		result = prime * result + ((temp == null) ? 0 : temp.hashCode());
		result = prime * result + usid;
		result = prime * result
				+ ((yjbiaoti == null) ? 0 : yjbiaoti.hashCode());
		result = prime * result
				+ ((yjcontent == null) ? 0 : yjcontent.hashCode());
		result = prime * result + yjid;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		YjInfo other = (YjInfo) obj;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (flag == null) {
			if (other.flag != null)
				return false;
		} else if (!flag.equals(other.flag))
			return false;
		if (photo == null) {
			if (other.photo != null)
				return false;
		} else if (!photo.equals(other.photo))
			return false;
		if (temp == null) {
			if (other.temp != null)
				return false;
		} else if (!temp.equals(other.temp))
			return false;
		if (usid != other.usid)
			return false;
		if (yjbiaoti == null) {
			if (other.yjbiaoti != null)
				return false;
		} else if (!yjbiaoti.equals(other.yjbiaoti))
			return false;
		if (yjcontent == null) {
			if (other.yjcontent != null)
				return false;
		} else if (!yjcontent.equals(other.yjcontent))
			return false;
		if (yjid != other.yjid)
			return false;
		return true;
	}
	
}
